package com.hs.jhzd.utils.enums;

public enum DayOfWeekFullEnum {
  MONDAY(2, "星期一"), TUESDAY(3, "星期二"), WEDNESDAY(4, "星期三"), THURSDAY(5, "星期四"), FRIDAY(6,
      "星期五"), SATURDAY(7, "星期六"), SUNDAY(1, "星期日");

  private int name;
  private String value;

  DayOfWeekFullEnum(int name, String value) {
    this.name = name;
    this.value = value;
  }

  /**
   * 根据name获取value.
   * 
   * @param name name
   * @return value
   */
  public static String getValue(int name) {
    for (DayOfWeekFullEnum d : DayOfWeekFullEnum.values()) {
      if (d.getName() == name) {
        return d.value;
      }
    }
    return null;
  }

  public int getName() {
    return name;
  }

}
